import request from '@/config/axios'

export interface BannerVO {
  id: number
  bannerImg1: string
  bannerImg2: string
  bannerImg3: string
  financialImg1: string
  financialImg2: string
  financialImg3: string
  skip: string
  content: string
}

// 查询推广设置-banner列表
// export const getBannerPage = async (params) => {
//   return await request.get({ url: `/hutai/banner/list`, params })
// }

// 查询推广设置-banner详情
// export const getBanner = async () => {
//   return await request.get({ url: `/hutai/banner/get`})
// }

// 查询推广设置-banner列表
export const getBannerPage = async (params) => {
  return await request.get({ url: `/hutai/banner/page`, params })
}

// 查询推广设置-banner详情
export const getBanner = async (id: number) => {
  return await request.get({ url: `/hutai/banner/get?id=` + id })
}

// 新增推广设置-banner
export const createBanner = async (data: BannerVO) => {
  return await request.post({ url: `/hutai/banner/create`, data })
}

// 修改推广设置-banner
export const updateBanner = async (data: BannerVO) => {
  return await request.put({ url: `/hutai/banner/update`, data })
}

// 删除推广设置-banner
export const deleteBanner = async (id: number) => {
  return await request.delete({ url: `/hutai/banner/delete?id=` + id })
}

// 导出推广设置-banner Excel
export const exportBanner = async (params) => {
  return await request.download({ url: `/hutai/banner/export-excel`, params })
}
